import { http } from "@/util/request/index";

// 账号密码登录
export const passwordLogin = (params) => {
  return http.post("/api/token/", params);
};

// 微信手机号绑定用户
export const wechatBindUser = (params) => {
  return http.post("/api/wx/user/bind/", params);
};

// 微信小程序一键登录
export const wechatLogin = (params) => {
  return http.post("/api/wx/user/login/", params);
};

// 当前用户信息
export const apiUserInfo = (params) => {
  return http.get("/api/userinfo/", params);
};

// 用户角色信息
export const apiUserInfoGroups = (params) => {
  return http.get("/api/userinfo/groups/", params);
};

// 用户钱包充值记录
export const walletRechargeRecord = (params) => {
  return http.get("/api/recharges/", { params });
};

// 用户钱包交易明细
export const walletRecord = (params) => {
  return http.get("/api/user/account/lines/", { params });
};

// 用户钱包充值
export const walletRecharge = (params) => {
  return http.post("/api/account/recharge/", params);
};

// 银行卡列表
export const getBankList = () => {
  return http.get("/api/account/bank/");
};

// 添加银行卡
export const addBank = (params) => {
  return http.post("/api/account/bank/", params);
};
